\hypertarget{sequencer_8h}{
\section{front\_\-panel/sequencer.h File Reference}
\label{sequencer_8h}\index{front\_\-panel/sequencer.h@{front\_\-panel/sequencer.h}}
}
Sequencer.  


\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{structstruct__ptt__sequencer}{struct\_\-ptt\_\-sequencer}
\begin{CompactList}\small\item\em All the delays are divided with 10 so 100 is really 1000 ms which makes the maximium delay 2550 ms. \item\end{CompactList}\item 
struct \hyperlink{structstruct__ptt}{struct\_\-ptt}
\begin{CompactList}\small\item\em PTT Sequencer struct. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{sequencer_8h_aae40a289cf630e5a9f47e737ee7752e}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-TX\_\-ACTIVE\_\-ON}~1
\begin{CompactList}\small\item\em Event that the radio should be PTT:ed from footswitch. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_d25126250cfc3462e8b59308fc6f2a0d}{
\#define \hyperlink{sequencer_8h_d25126250cfc3462e8b59308fc6f2a0d}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-ON}~2}
\label{sequencer_8h_d25126250cfc3462e8b59308fc6f2a0d}

\begin{CompactList}\small\item\em Event that the inhibit output should be on. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_f38759260db765aa98a8036725db06cd}{
\#define \hyperlink{sequencer_8h_f38759260db765aa98a8036725db06cd}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-RADIO\_\-ON}~3}
\label{sequencer_8h_f38759260db765aa98a8036725db06cd}

\begin{CompactList}\small\item\em Event that the radio should be PTT:ed from footswitch. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_f5a386f4adf5a932b756b540b8f6be79}{
\#define \hyperlink{sequencer_8h_f5a386f4adf5a932b756b540b8f6be79}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-AMP\_\-ON}~4}
\label{sequencer_8h_f5a386f4adf5a932b756b540b8f6be79}

\begin{CompactList}\small\item\em Event that the amp should be PTT:ed from footswitch. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_6a89977d20bdd32f477dde7646f0ca8f}{
\#define \hyperlink{sequencer_8h_6a89977d20bdd32f477dde7646f0ca8f}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-TX\_\-ACTIVE\_\-OFF}~5}
\label{sequencer_8h_6a89977d20bdd32f477dde7646f0ca8f}

\begin{CompactList}\small\item\em Event that the inhibit should be activated from footswitch. \item\end{CompactList}\item 
\#define \hyperlink{sequencer_8h_765792034f6c1607059edeac24354bf2}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF}~6
\begin{CompactList}\small\item\em Event that the TX active output should be off. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_7a371779f225b2ecf366d5f30192ab1f}{
\#define \hyperlink{sequencer_8h_7a371779f225b2ecf366d5f30192ab1f}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-RADIO\_\-OFF}~7}
\label{sequencer_8h_7a371779f225b2ecf366d5f30192ab1f}

\begin{CompactList}\small\item\em Event that the radio should be deactivated from footswitch. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_ece8368b679b708e800b2ae3b20628c6}{
\#define \hyperlink{sequencer_8h_ece8368b679b708e800b2ae3b20628c6}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-AMP\_\-OFF}~8}
\label{sequencer_8h_ece8368b679b708e800b2ae3b20628c6}

\begin{CompactList}\small\item\em Event that the amp should be deactivated from footswitch. \item\end{CompactList}\item 
\#define \hyperlink{sequencer_8h_765792034f6c1607059edeac24354bf2}{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF}~9
\begin{CompactList}\small\item\em Event that the TX active output should be off. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_0a2333714aea2d77855a876b472a3ab3}{
\#define \hyperlink{sequencer_8h_0a2333714aea2d77855a876b472a3ab3}{PTT\_\-INPUT\_\-FOOTSWITCH}~0}
\label{sequencer_8h_0a2333714aea2d77855a876b472a3ab3}

\begin{CompactList}\small\item\em Flag bit offset for the footswitch. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_6f0d4d0c159fa58e95792decb825576c}{
\#define \hyperlink{sequencer_8h_6f0d4d0c159fa58e95792decb825576c}{PTT\_\-INPUT\_\-RADIO\_\-SENSE\_\-UP}~1}
\label{sequencer_8h_6f0d4d0c159fa58e95792decb825576c}

\begin{CompactList}\small\item\em Flag bit offset for the radio sense on the upper floor. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_a8dc5188b2856a2cf2812a74a17ae350}{
\#define \hyperlink{sequencer_8h_a8dc5188b2856a2cf2812a74a17ae350}{PTT\_\-INPUT\_\-RADIO\_\-SENSE\_\-LO}~2}
\label{sequencer_8h_a8dc5188b2856a2cf2812a74a17ae350}

\begin{CompactList}\small\item\em Flag bit offset for the radio sense on the lower floor. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_fa21a420a829c483647804e3bbc1803f}{
\#define \hyperlink{sequencer_8h_fa21a420a829c483647804e3bbc1803f}{PTT\_\-INPUT\_\-COMPUTER\_\-RTS}~3}
\label{sequencer_8h_fa21a420a829c483647804e3bbc1803f}

\begin{CompactList}\small\item\em Flag bit offset for the COMPUTER RTS signal. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_4c13802d0307a01c3f6936ed794f8d3b}{
\#define \hyperlink{sequencer_8h_4c13802d0307a01c3f6936ed794f8d3b}{PTT\_\-INPUT\_\-INVERTED\_\-RADIO\_\-SENSE}~4}
\label{sequencer_8h_4c13802d0307a01c3f6936ed794f8d3b}

\begin{CompactList}\small\item\em Flag bit offset for an inverted radio sense signal. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_f449c6d38de6e016356a45fa0e2ea380}{
\#define \hyperlink{sequencer_8h_f449c6d38de6e016356a45fa0e2ea380}{PTT\_\-INPUT\_\-INVERTED\_\-COMPUTER\_\-RTS}~5}
\label{sequencer_8h_f449c6d38de6e016356a45fa0e2ea380}

\begin{CompactList}\small\item\em Flag bit offset for an inverted computer rts signal. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_eebdfa78b7e9c83edc88a73337fe55d7}{
\#define \hyperlink{sequencer_8h_eebdfa78b7e9c83edc88a73337fe55d7}{PTT\_\-INPUT\_\-INHIBIT\_\-POLARITY}~6}
\label{sequencer_8h_eebdfa78b7e9c83edc88a73337fe55d7}

\begin{CompactList}\small\item\em Flag bit offset for the inhibit polarity. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_4ecfaca15b56017b6b8b24ed0e2bdb95}{
\#define \hyperlink{sequencer_8h_4ecfaca15b56017b6b8b24ed0e2bdb95}{SEQUENCER\_\-PTT\_\-RADIO\_\-ENABLED}~0}
\label{sequencer_8h_4ecfaca15b56017b6b8b24ed0e2bdb95}

\begin{CompactList}\small\item\em Sequencer enabled for RADIO. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_428ea44a5577b06ef0f6f1070065c65b}{
\#define \hyperlink{sequencer_8h_428ea44a5577b06ef0f6f1070065c65b}{SEQUENCER\_\-PTT\_\-AMP\_\-ENABLED}~1}
\label{sequencer_8h_428ea44a5577b06ef0f6f1070065c65b}

\begin{CompactList}\small\item\em Sequencer enabled for AMP. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_96aeef2285686486d8093a8a475679be}{
\#define \hyperlink{sequencer_8h_96aeef2285686486d8093a8a475679be}{SEQUENCER\_\-PTT\_\-INHIBIT\_\-ENABLED}~2}
\label{sequencer_8h_96aeef2285686486d8093a8a475679be}

\begin{CompactList}\small\item\em Sequencer enabled for INHIBIT. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hypertarget{sequencer_8h_70c4a395961e80655ad14fe4779f7fd3}{
unsigned char \hyperlink{sequencer_8h_70c4a395961e80655ad14fe4779f7fd3}{sequencer\_\-get\_\-ptt\_\-active} (void)}
\label{sequencer_8h_70c4a395961e80655ad14fe4779f7fd3}

\begin{CompactList}\small\item\em Retrieve which PTT inputs that are currently active, defines above. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_a29ae1c1d47ca3fbd6a910beb32d10e8}{
void \hyperlink{sequencer_8h_a29ae1c1d47ca3fbd6a910beb32d10e8}{sequencer\_\-load\_\-eeprom} (void)}
\label{sequencer_8h_a29ae1c1d47ca3fbd6a910beb32d10e8}

\begin{CompactList}\small\item\em This function will load data from the eeprom to the ptt\_\-sequencer struct. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_205749ea1a958bd5efa4f5abc1a6ff2e}{
void \hyperlink{sequencer_8h_205749ea1a958bd5efa4f5abc1a6ff2e}{sequencer\_\-footsw\_\-pressed} (void)}
\label{sequencer_8h_205749ea1a958bd5efa4f5abc1a6ff2e}

\begin{CompactList}\small\item\em Function to be called if the footswitch is pressed. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_447cb34cbaba75283524b32ea1e1fc35}{
void \hyperlink{sequencer_8h_447cb34cbaba75283524b32ea1e1fc35}{sequencer\_\-footsw\_\-released} (void)}
\label{sequencer_8h_447cb34cbaba75283524b32ea1e1fc35}

\begin{CompactList}\small\item\em Function to be called if the footswitch is released. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_e57c1a07f28becc0318f364b15196d25}{
void \hyperlink{sequencer_8h_e57c1a07f28becc0318f364b15196d25}{sequencer\_\-computer\_\-rts\_\-activated} (void)}
\label{sequencer_8h_e57c1a07f28becc0318f364b15196d25}

\begin{CompactList}\small\item\em Function to be called if the computer rts is activated. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_2083ed0682dc10e08b34165e621b8ffb}{
void \hyperlink{sequencer_8h_2083ed0682dc10e08b34165e621b8ffb}{sequencer\_\-computer\_\-rts\_\-deactivated} (void)}
\label{sequencer_8h_2083ed0682dc10e08b34165e621b8ffb}

\begin{CompactList}\small\item\em Function to be called if the computer rts is deactivated. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_558af8a3cc03524c519865da8c52e94d}{
void \hyperlink{sequencer_8h_558af8a3cc03524c519865da8c52e94d}{sequencer\_\-radio\_\-sense\_\-activated} (void)}
\label{sequencer_8h_558af8a3cc03524c519865da8c52e94d}

\begin{CompactList}\small\item\em Function to be called if the radio sense input is activated. \item\end{CompactList}\item 
\hypertarget{sequencer_8h_2d3a0f37732079072955fc9397fccae8}{
void \hyperlink{sequencer_8h_2d3a0f37732079072955fc9397fccae8}{sequencer\_\-radio\_\-sense\_\-deactivated} (void)}
\label{sequencer_8h_2d3a0f37732079072955fc9397fccae8}

\begin{CompactList}\small\item\em Function to be called if the radio sense input is deactivated. \item\end{CompactList}\item 
unsigned char \hyperlink{sequencer_8h_0810a2f37dd0688f603cec15d4b2fd7d}{sequencer\_\-get\_\-rts\_\-polarity} (void)
\begin{CompactList}\small\item\em Retrieve the polarity of the Computer RTS signal. \item\end{CompactList}\item 
unsigned char \hyperlink{sequencer_8h_a0bf8e67faeaaa623abc17be9ad9371d}{sequencer\_\-get\_\-sense\_\-polarity} (void)
\begin{CompactList}\small\item\em Retrieve the polarity of the radio sense signal. \item\end{CompactList}\item 
unsigned char \hyperlink{sequencer_8h_bd5428803147cbe9960a82d9e6e7dce6}{sequencer\_\-ptt\_\-active} (void)
\begin{CompactList}\small\item\em Will return if the PTT is active or not. \item\end{CompactList}\item 
unsigned char \hyperlink{sequencer_8h_989542be4592763f28295ccc7fe8db3c}{sequencer\_\-get\_\-radio\_\-sense} (void)
\begin{CompactList}\small\item\em Retrieve if the radio sense should be sensed from upper floor or bottom. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Sequencer. 

\begin{Desc}
\item[Author:]Mikael Larsmark, SM2WMV \end{Desc}
\begin{Desc}
\item[Date:]2010-01-25 

\begin{Code}\begin{verbatim} #include "front_panel/sequencer.h" 
\end{verbatim}
\end{Code}

 \end{Desc}


Definition in file \hyperlink{sequencer_8h-source}{sequencer.h}.

\subsection{Define Documentation}
\hypertarget{sequencer_8h_765792034f6c1607059edeac24354bf2}{
\index{sequencer.h@{sequencer.h}!SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF@{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF}}
\index{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF@{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF}!sequencer.h@{sequencer.h}}
\subsubsection[{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF}]{\setlength{\rightskip}{0pt plus 5cm}\#define SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF~9}}
\label{sequencer_8h_765792034f6c1607059edeac24354bf2}


Event that the TX active output should be off. 

Event that the inhibit should be deactiated from footswitch. 

Definition at line 47 of file sequencer.h.\hypertarget{sequencer_8h_765792034f6c1607059edeac24354bf2}{
\index{sequencer.h@{sequencer.h}!SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF@{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF}}
\index{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF@{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF}!sequencer.h@{sequencer.h}}
\subsubsection[{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF}]{\setlength{\rightskip}{0pt plus 5cm}\#define SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-INHIBIT\_\-OFF~6}}
\label{sequencer_8h_765792034f6c1607059edeac24354bf2}


Event that the TX active output should be off. 

Event that the inhibit should be deactiated from footswitch. 

Definition at line 47 of file sequencer.h.

Referenced by sequencer\_\-computer\_\-rts\_\-deactivated(), and sequencer\_\-footsw\_\-released().\hypertarget{sequencer_8h_aae40a289cf630e5a9f47e737ee7752e}{
\index{sequencer.h@{sequencer.h}!SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-TX\_\-ACTIVE\_\-ON@{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-TX\_\-ACTIVE\_\-ON}}
\index{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-TX\_\-ACTIVE\_\-ON@{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-TX\_\-ACTIVE\_\-ON}!sequencer.h@{sequencer.h}}
\subsubsection[{SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-TX\_\-ACTIVE\_\-ON}]{\setlength{\rightskip}{0pt plus 5cm}\#define SEQUENCER\_\-EVENT\_\-TYPE\_\-PTT\_\-TX\_\-ACTIVE\_\-ON~1}}
\label{sequencer_8h_aae40a289cf630e5a9f47e737ee7752e}


Event that the radio should be PTT:ed from footswitch. 

Sequencer message types, this is used to we can keep track of different messages in the event queue. So if an event is aborted we can easily just remove the upcoming events from the queue, that doesn't need to be executed 

Definition at line 31 of file sequencer.h.

Referenced by sequencer\_\-computer\_\-rts\_\-activated(), sequencer\_\-computer\_\-rts\_\-deactivated(), sequencer\_\-footsw\_\-pressed(), and sequencer\_\-footsw\_\-released().

\subsection{Function Documentation}
\hypertarget{sequencer_8h_989542be4592763f28295ccc7fe8db3c}{
\index{sequencer.h@{sequencer.h}!sequencer\_\-get\_\-radio\_\-sense@{sequencer\_\-get\_\-radio\_\-sense}}
\index{sequencer\_\-get\_\-radio\_\-sense@{sequencer\_\-get\_\-radio\_\-sense}!sequencer.h@{sequencer.h}}
\subsubsection[{sequencer\_\-get\_\-radio\_\-sense}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char sequencer\_\-get\_\-radio\_\-sense (void)}}
\label{sequencer_8h_989542be4592763f28295ccc7fe8db3c}


Retrieve if the radio sense should be sensed from upper floor or bottom. 

\begin{Desc}
\item[Returns:]0 if lower floor, 1 if upper floor \end{Desc}


Definition at line 231 of file sequencer.c.

References struct\_\-ptt::ptt\_\-input, and PTT\_\-INPUT\_\-RADIO\_\-SENSE\_\-UP.

Referenced by event\_\-parse\_\-ext\_\-event().\hypertarget{sequencer_8h_0810a2f37dd0688f603cec15d4b2fd7d}{
\index{sequencer.h@{sequencer.h}!sequencer\_\-get\_\-rts\_\-polarity@{sequencer\_\-get\_\-rts\_\-polarity}}
\index{sequencer\_\-get\_\-rts\_\-polarity@{sequencer\_\-get\_\-rts\_\-polarity}!sequencer.h@{sequencer.h}}
\subsubsection[{sequencer\_\-get\_\-rts\_\-polarity}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char sequencer\_\-get\_\-rts\_\-polarity (void)}}
\label{sequencer_8h_0810a2f37dd0688f603cec15d4b2fd7d}


Retrieve the polarity of the Computer RTS signal. 

\begin{Desc}
\item[Returns:]1 if the polarity is active low (inverted), 0 otherwise \end{Desc}


Definition at line 210 of file sequencer.c.

References struct\_\-ptt::ptt\_\-input, and PTT\_\-INPUT\_\-INVERTED\_\-COMPUTER\_\-RTS.

Referenced by event\_\-parse\_\-ext\_\-event().\hypertarget{sequencer_8h_a0bf8e67faeaaa623abc17be9ad9371d}{
\index{sequencer.h@{sequencer.h}!sequencer\_\-get\_\-sense\_\-polarity@{sequencer\_\-get\_\-sense\_\-polarity}}
\index{sequencer\_\-get\_\-sense\_\-polarity@{sequencer\_\-get\_\-sense\_\-polarity}!sequencer.h@{sequencer.h}}
\subsubsection[{sequencer\_\-get\_\-sense\_\-polarity}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char sequencer\_\-get\_\-sense\_\-polarity (void)}}
\label{sequencer_8h_a0bf8e67faeaaa623abc17be9ad9371d}


Retrieve the polarity of the radio sense signal. 

\begin{Desc}
\item[Returns:]1 if the polarity is active low (inverted), 0 otherwise \end{Desc}


Definition at line 219 of file sequencer.c.

References struct\_\-ptt::ptt\_\-input, and PTT\_\-INPUT\_\-INVERTED\_\-RADIO\_\-SENSE.

Referenced by event\_\-parse\_\-ext\_\-event().\hypertarget{sequencer_8h_bd5428803147cbe9960a82d9e6e7dce6}{
\index{sequencer.h@{sequencer.h}!sequencer\_\-ptt\_\-active@{sequencer\_\-ptt\_\-active}}
\index{sequencer\_\-ptt\_\-active@{sequencer\_\-ptt\_\-active}!sequencer.h@{sequencer.h}}
\subsubsection[{sequencer\_\-ptt\_\-active}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char sequencer\_\-ptt\_\-active (void)}}
\label{sequencer_8h_bd5428803147cbe9960a82d9e6e7dce6}


Will return if the PTT is active or not. 

\begin{Desc}
\item[Returns:]The state of the ptt\_\-active variable, 0 if nothing is PTTing the radio \end{Desc}


Definition at line 225 of file sequencer.c.

References ptt\_\-active.